#include "textbox.h"
#include "widget_factory.h"

using namespace krryn::gui;

textbox::textbox(const with &a_Initializer)
: widget(create_widget_base<impl>()){
	m_Pimpl = get_impl<impl>();
	m_Pimpl->make(a_Initializer);
	m_Pimpl->post_make(*this, a_Initializer.get_parent());
}

void *textbox::handle(){
	return m_Pimpl->handle();
}

textbox_initializer::textbox_initializer() {
	width(175);
	height(23);
}

textbox_initializer::textbox_initializer(const properties &a_Props) : widget_initializer(a_Props){
	if(!a_Props.has("width")) width(175);
	if(!a_Props.has("height")) height(23);
}

textbox* textbox_initializer::create(){
	return new textbox(*this);
}